home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1990 Summer / rerun-1990-summer.d64 / address manager (.txt) next >
Commodore BASIC  |  2022-09-20  |  8KB  |  214 lines

  1. 1 print"[147]would you like installation instructions
  2. 2 [153]"y/n?
  3. 3 geta$:if a$=""then 3
  4. 4 if a$="n" then 100
  5. 10 print"[147] to use address manager, copy it to
  6. 20 [153]"a work disk. you can do that now by
  7. 25 print"pressing run/stop-restore, placing a
  8. 26 [153]"work disk in the drive and typing:
  9. 27 print"save "chr$(34)"address manager"chr$(34)",8:
  10. 30 [153]"then run graphics prg and data program
  11. 40 print"from this summer rerun disk. you need
  12. 50 [153]"address manager, graphics file and data
  13. 60 print"file on a work disk in order to use
  14. 70 [153]"this program.":[153]"       press a key
  15. 80 get a$:if a$="" then 80
  16. 100 rem "address manager" version 4.0 by ralph h. rethoret revised april 1990
  17. 110 poke53280,0:poke53281,0:poke646,5:poke650,64:print""
  18. 120 print"[147]              [196]ata loading..."chr$(14)
  19. 130 dimzo$(162),zo%(162),na$(162),ns$(162),ci$(162)
  20. 140 dimpc$(162),co$(162),ph$(162),g$(162),so$(162)
  21. 150 open2,8,2,"graphics file,s,r":input#2,ul$,ur$,ll$,lr$,v$,h$,h2$,h4$,h8$,hs$
  22. 160 input#2,s$,s2$,s4$,s8$,ss$,d$,d2$,d4$,d8$:close2
  23. 170 open15,8,15:gosub1920
  24. 180 open2,8,2,"data file,s,r":input#2,n$:ifn$="a"thenn$="":n=0:rs=-1:goto220
  25. 190 n=val(n$):rs=0
  26. 200 fori=1ton:input#2,zo$(i),na$(i),ns$(i),ci$(i)
  27. 210 input#2,co$(i),pc$(i),ph$(i),g$(i),so$(i):zo%(i)=val(zo$(i)):next
  28. 220 gosub1920
  29. 230 r=0:q=0:close2
  30. 240 print"[147]":ta$=chr$(16)
  31. 250 printd4$s8$s4$"[193]ddress  [205]anager":print:prints4$s2$ul$hs$h8$h2$ur$
  32. 260 prints4$s2$v$" 1 - [195]reate a [206]ew [210]ecord? "v$
  33. 270 prints4$s2$v$" 2 - [195]heck and/or [195]hange? "v$
  34. 280 prints4$s2$v$" 3 - [208]rintout  [193]ll  [196]ata? "v$
  35. 290 prints4$s2$v$" 4 - [208]rint [208]hone [206]umbers? "v$
  36. 300 prints4$s2$v$" 5 - [204]abels and/or [204]ists? "v$
  37. 310 prints4$s2$v$" 6 - [209]uit, [211]ort and [211]ave? "v$
  38. 320 prints4$s2$ll$hs$h8$h2$lr$
  39. 330 printd4$s8$s4$"[211]elect  1 to 6[146] ";
  40. 340 open1,0:input#1,m$:close1:m%=val(m$):ifm%<1orm%>6then240
  41. 350 onm%goto360,830,730,1660,1230,1730
  42. 360 n=n+1:q=q+1:ifn=163thenn=n-1:q=q-1:goto1730
  43. 370 print"[147]"d4$s8$s2$s$"[199]eographical [218]one":print:prints8$s4$ul$h8$h4$h$ur$
  44. 380 prints8$s4$v$" 1 - [213].[211].[193].? "v$:prints8$s4$v$" 2 - [195]anada? "v$
  45. 390 prints8$s4$v$" 3 - [207]thers? "v$:prints8$s4$ll$h8$h4$h$lr$
  46. 400 printd2$s8$s2$"[195]hoose  1, 2 or 3[146] ";
  47. 410 open1,0:input#1,zo$(n):close1:zo%(n)=val(zo$(n))
  48. 420 ifzo%(n)<1orzo%(n)>3then400
  49. 430 onzo%(n)goto440,500,570
  50. 440 printd2$"[147][197]nter name: ":gosub1970:na$(n)=b$:b$="":print
  51. 450 print"[197]nter street address: ":gosub1970:ns$(n)=b$:b$="":print
  52. 460 print"[197]nter [195]ity [211]tate and [218][201][208]: ":gosub1970:ci$(n)=b$:b$="":print
  53. 470 pc$(n)="":co$(n)="[213].[211].[193]."
  54. 480 print"[197]nter phone number.":open1,0:input#1,ph$(n):close1
  55. 490 goto640
  56. 500 printd2$"[147][197]nter name: ":gosub1970:na$(n)=b$:b$="":print
  57. 510 print"[197]nter street address: ":gosub1970:ns$(n)=b$:b$="":print
  58. 520 print"[197]nter city and province: ":gosub1970:ci$(n)=b$:b$="":print
  59. 530 print"[197]nter postal code.":open1,0:input#1,pc$(n):close1:print
  60. 540 ifpc$(n)=""then530
  61. 550 co$(n)="[195]anada":print"[197]nter phone number":open1,0:input#1,ph$(n):close1
  62. 560 goto640
  63. 570 printd2$"[147][197]nter name: ":gosub1970:na$(n)=b$:b$="":print
  64. 580 print"[197]nter postal code and city.
  65. 590 [153]"(or street and number): ":[141]1970:ns$(n)[178]b$:b$[178]"":[153]
  66. 600 [153]"valnter street and number.
  67. 610 print"(or postal code and city): ":gosub1970:ci$(n)=b$:b$="":print
  68. 620 pc$(n)="":print"[197]nter country: ":gosub1970:co$(n)=b$:b$="":print
  69. 630 print"[197]nter phone number.":open1,0:input#1,ph$(n):close1
  70. 640 print"[147]":prints8$"[196]o you wish to  assign a
  71. 650 [153]s4$s2$s$"group code to this record?":[153]s8$s$"right$f so,  enter a single
  72. 660 prints4$s2$"letter  (a to z, lower case)
  73. 670 [153]s4$s$s2$"and press (NULL)val(NULL)(NULL)(NULL)(NULL)wait.  right$f not,"
  74. 680 [153]s8$s2$s$"just press (NULL)val(NULL)(NULL)(NULL)(NULL)wait.
  75. 690 open1,0:input#1,g$(n):close1:ifg$(n)=""then240
  76. 700 iflen(g$(n))>1then640
  77. 710 ifasc(g$(n))<65orasc(g$(n))>90then640
  78. 720 goto240
  79. 730 open3,4,7:fori=1tonstep3
  80. 740 print#3,ta$"04"na$(i)ta$"29"na$(i+1)ta$"54"na$(i+2)
  81. 750 print#3,ta$"04"ns$(i)ta$"29"ns$(i+1)ta$"54"ns$(i+2)
  82. 760 print#3,ta$"04"ci$(i)ta$"29"ci$(i+1)ta$"54"ci$(i+2)
  83. 770 print#3,ta$"04"pc$(i)ta$"29"pc$(i+1)ta$"54"pc$(i+2)
  84. 780 print#3,ta$"04"co$(i)ta$"29"co$(i+1)ta$"54"co$(i+2)
  85. 790 print#3,ta$"04"ph$(i)ta$"18 [210]ec"i;g$(i)ta$"29"ph$(i+1)ta$"43 [210]ec"i+1;
  86. 800 print#3,g$(i+1)ta$"54"ph$(i+2)ta$"68 [210]ec"i+2;g$(i+2):print#3
  87. 810 if(i+2)/27=int((i+2)/27)thenprint#3:print#3:print#3
  88. 820 next:close3:goto240
  89. 830 print"[147]":prints4$s2$s$"[215]hich record number do you
  90. 840 [153]s8$s4$s2$"wish to see?":[153]:[153]"(NULL)ecord ";:[159]1,0:[132]1,j:[160]1
  91. 850 [139]j[179]1[176]j[177]n[167]830
  92. 860 [153]:[153]d2$s$"1-(NULL)one:"zo%(j):[153]s$"(1=(NULL)(NULL)atn,2=lenan,3=(NULL)th)"
  93. 870 [153]s$"2-"na$(j):[153]s$"3-"ns$(j)
  94. 880 [153]s$"4-"ci$(j):[153]s$"5-"pc$(j):[153]s$"6-"co$(j):[153]s$"7-"ph$(j)
  95. 890 [153]s$"8-chr$roup code: "g$(j)
  96. 900 [153]:[153]s8$s2$s$"(NULL)hich line do you
  97. 910 prints8$s4$"wish to change?"
  98. 920 prints8$s4$s2$"(0 if none)":print
  99. 930 open1,0:input#1,k$:close1:k%=val(k$):ifk%=0then240
  100. 940 ifk%<1ork%>8then900
  101. 950 print"[197]nter new information:
  102. 960 [145]k%[137]970,990,1070,1080,1090,1100,1110,1120
  103. 970 [159]1,0:[132]1,zo%(j):[160]1:[139]zo%(j)[179]1[176]zo%(j)[177]3[167]970
  104. 980 [137]1160
  105. 990 [159]1,0:[132]1,na$(j):[160]1:q[178]q[170]1:[139]na$(j)[179][177]""[167]1160
  106. 1000 [133]"cmdcmd(NULL)ou wish to erase this record (y/n)";y$
  107. 1010 [139] [200](y$,1)[179][177]"y"[167]240
  108. 1020 [139]n[179]2[175]rs[177][171]1[167][141]2060:[137]240
  109. 1030 [153]"valrasing (NULL)ec."j:[129]i[178]1[164]1000:[130]:so$(j)[178]""
  110. 1040 [129]c[178]j[164]n:zo%(c)[178]zo%(c[170]1):na$(c)[178]na$(c[170]1):ns$(c)[178]ns$(c[170]1):ci$(c)[178]ci$(c[170]1)
  111. 1050 pc$(c)[178]pc$(c[170]1):co$(c)[178]co$(c[170]1):ph$(c)[178]ph$(c[170]1):g$(c)[178]g$(c[170]1)
  112. 1060 so$(c)[178]so$(c[170]1):[130]:n[178]n[171]1:[137]240
  113. 1070 [141]1970:ns$(j)[178]b$:b$[178]"":[137]1160
  114. 1080 [141]1970:ci$(j)[178]b$:b$[178]"":[137]1160
  115. 1090 [141]1970:pc$(j)[178]b$:b$[178]"":[137]1160
  116. 1100 [141]1970:co$(j)[178]b$:b$[178]"":[137]1160
  117. 1110 [159]1,0:[132]1,ph$(j):[160]1:[137]1160
  118. 1120 [159]1,0:[132]1,g$(j):[160]1
  119. 1130 [139]g$(j)[178]""[167]1160
  120. 1140 [139][195](g$(j))[177]1[167]1120
  121. 1150 [139][198](g$(j))[179]65[176][198](g$(j))[177]90[167]1120
  122. 1160 [153]"load":[153]s8$"str$o you wish to make more
  123. 1170 prints8$"changes to  this record?
  124. 1180 [153]s8$s4$s2$"ywaites or nwaito?";
  125. 1190 [161]w$
  126. 1200 [139]w$[178]"y"[167]860
  127. 1210 [139]w$[178]"n"[167]240
  128. 1220 [137]1190
  129. 1230 [153]"load"d4$d2$d$
  130. 1240 [153]s8$"atnddress (NULL)ists and (NULL)abels":[153]:[153]s8$s$ul$hs$h4$h$ur$
  131. 1250 [153]s8$s$v$"1-ascull (NULL)et of (NULL)abels?"v$
  132. 1260 [153]s8$s$v$"2-ascull  atnddress (NULL)ist?"v$
  133. 1270 [153]s8$s$v$"3-(NULL)ne (NULL)abel (NULL)epeated?"v$
  134. 1280 [153]s8$s$v$"4-(NULL)abels for a chr$roup?"v$
  135. 1290 [153]s8$s$v$"5-chr$roup atnddress (NULL)ist?"v$:[153]s8$s$ll$hs$h4$h$lr$
  136. 1300 [153]:[153]s8$s2$"lenhoose:  1,2,3,4 or 5wait ";
  137. 1310 [159]1,0:[132]1,l$:[160]1:l%[178][197](l$):[139]l%[179]1[176]l%[177]5[167]1230
  138. 1320 dn[178]5:[139]l%[178]2[176]l%[178]5[167]dn[178]4:[137]1370
  139. 1330 dn[178]4:[159]14,5,15:[160]14:[139]st[178]0[167]dn[178]5
  140. 1340 [153]:[153]"  str$o you wish country name printed? (NULL)/(NULL)wait";
  141. 1350 [161]yn$:[139]yn$[178]""[167]1350
  142. 1360 [139]yn$[179][177]"y"[175]yn$[179][177]"n"[167]1350
  143. 1370 [145]l%[137]1450,1450,1480,1560,1560
  144. 1380 [152]3,na$(i):[152]3,ns$(i):[152]3,ci$(i)
  145. 1390 [139]yn$[178]"n"[167]1940
  146. 1400 [145]zo%(i)[137]1410,1420,1430
  147. 1410 [152]3,co$(i)ta$"27"i:[152]3:[137]1440
  148. 1420 [152]3,pc$(i)ta$"18"co$(i)ta$"27"i:[152]3:[137]1440
  149. 1430 [152]3,co$(i)ta$"27"i:[152]3
  150. 1440 [152]3:[142]
  151. 1450 b[178]0:[159]3,dn,7:[129]i[178]1[164]n:[141]1380
  152. 1460 b[178]b[170]1:[139]b[173]10[178][181](b[173]10)[175]l%[178]2[167][129]j[178]1[164]6:[152]3:[130]
  153. 1470 [130]:[160]3:[137]240
  154. 1480 [153]:[153]s4$"(NULL)hich record do you wish to use?":[159]1,0:[132]1,a$:[160]1
  155. 1490 a%[178][197](a$):[139]a%[179]1[176]a%[177]n[167]1480
  156. 1500 [153]
  157. 1510 [153]s2$"left$ow many copies do you wish t